package com.lynn.salary.entity;

import java.util.Date;

public class Accessory extends BaseEntity{

	public static final String PUBLISH = "发布;";
	public static final String DRAFT = "草稿;";
	
	private String id;
	private Date alterTime;
	private String creator;
	private String name;
	private Date newTime;
	private String description;
	private String tag=DRAFT;
	private int isDeleted = 0;// 是否被删除   -1为删除 0为未删除  默认为0

	/**
	 * 获取所有字段
	 * 
	 * @return
	 */
	public static String[] getFields() {

		return new String[] { "id", "alterTime", "creator", "name", "newTime","description","tag"};
	}

	/**
	 * 获取表名
	 * 
	 * @return
	 */
	public static String getTableName() {

		return "accessory";
	}

	/**
	 * 获取主键名字
	 * 
	 * @return
	 */
	public static String getPkName() {

		return "id";
	}

	public static Object[] getFk(String field) {
		if (field.equals("creator")) {
			return new Object[] { User_.class, "id" };
		}  else
			return null;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getAlterTime() {
		return alterTime;
	}

	public void setAlterTime(Date alterTime) {
		this.alterTime = alterTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getNewTime() {
		return newTime;
	}

	public void setNewTime(Date newTime) {
		this.newTime = newTime;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public int getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(int isDeleted) {
		this.isDeleted = isDeleted;
	}

}
